<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    h2 {
      text-align: center;
    }

    table {
      border-collapse: collapse;
      margin: 0 auto;
      height: 80px;
      text-align: center;
    }

    th {
      padding: 5px 30px;
    }

    tabel,
    th,
    td {
      border: 1px solid #000;
    }
  </style>
</head>
<body>
  <h2>每月银行卡余额</h2>
 

  <script>
    let total = +prompt('请输入您的银行卡总额：')
    let ele = +prompt('请输入您本月花费的电费：')
    let water = +prompt('请输入您本月花费的水费：')
    let web = +prompt('请输入您本月花费的网费：')
    let sum = total - ele - water - web
    document.write(`
      <table>
        <tr>
          <th>银行卡总额</th>
          <th>电费</th>
          <th>水费</th>
          <th>网费</th>
          <th>银行卡余额</th>
        </tr>
        <tr>
          <td>${total}</td>
          <td>${ele}</td>
          <td>${water}</td>
          <td>${web}</td>
          <td>${sum}</td>
        </tr>
      </table>
    `)
  </script>
</body>
</html>